package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class SearchAllBabyRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/get_babies_info_ByMobilePhone";

    private String searchPhone;

    public String getSearchPhone() {
        return searchPhone;
    }

    public void setSearchPhone(String searchPhone) {
        this.searchPhone = searchPhone;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        SearchAllBabyRequestBody body = new SearchAllBabyRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setSearchPhone(getSearchPhone());
        return body;
    }

    private class SearchAllBabyRequestBody extends BaseTokenRequestBody {

        @SerializedName("MobilePhone")
        private String searchPhone;

        public String getSearchPhone() {
            return searchPhone;
        }

        public void setSearchPhone(String searchPhone) {
            this.searchPhone = searchPhone;
        }

        private SearchAllBabyRequestBody() {
            setSv(BaseRequestConfig.SV_SEARCH_BABY_ALL_GET);
        }
    }
}
